#lang racket

(define (pascal row col)
  (if (= row 1)
      (if (= col 1) 1 -1)
      (cond ((= col 1) 1)
            ((= col row) 1)
            (else (+ (pascal (- row 1) (- col 1))
                     (pascal (- row 1) col))))))

;test
(pascal 1 2)
(pascal 2 1)
(pascal 3 2)
(pascal 4 2)
(pascal 5 3)
